<?php
	ini_set('date.timezone','Asia/Shanghai');
	header("content-type:text/html;charset=utf-8");

   	$mysql_conf = array(
        'host'    => '127.0.0.1', 
        'db'      => 'gdgf', 
        'db_user' => 'root', 
        'db_pwd'  => 'root', 
    );

    $mysqli = @new mysqli($mysql_conf['host'],$mysql_conf['db_user'],$mysql_conf['db_pwd']);
	    if ($mysqli->connect_errno) {
	        die("could not connect to the database:\n" . $mysqli->connect_error);//诊断连接错误
	    }
	    $mysqli->query("set names 'utf8';");//编码转化
	    $select_db = $mysqli->select_db($mysql_conf['db']);
	    if (!$select_db) {
	        die("could not connect to the db:\n" .  $mysqli->error);
	    }

    $sql ="SELECT * FROM user";

    $query = $mysqli->query($sql);

    while ($row = $query->fetch_array()) {
    	echo 'ID：'.$row['Id'].'<br>姓名：'.$row['name'].'<br>电话号码：'.$row['telphone'].'<br>提交时间：'.$row['create_time'].'<br>首付成数：'.$row['paymentnumber'].'<br>购房楼层：'.$row['level'].'<br>贷款类别：'.$row['paymentform'].'<br>客户端ip：'.$row['ip'].'<br>------------------------------------<br>';
    }


	//释放资源
	$query->close();
    $mysqli->close();



?>